﻿<phoneNavigation:PhoneApplicationPage 
    x:Class="TED.Video"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phoneNavigation="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:local="clr-namespace:TED"
    xmlns:vm="clr-namespace:TED.ViewModels"
    xmlns:BehaviorsLibrary="clr-namespace:BehaviorsLibrary" 
	xmlns:smf_converters="clr-namespace:Microsoft.SilverlightMediaFramework.Utilities.Converters;assembly=Microsoft.SilverlightMediaFramework.Utilities.Phone" 
	xmlns:System="clr-namespace:System;assembly=mscorlib" 
	xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
    xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" 
    xmlns:im="clr-namespace:Microsoft.Expression.Interactivity.Media;assembly=Microsoft.Expression.Interactions" 
	xmlns:GalaSoft_MvvmLight_Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP7" 
    xmlns:System_Windows_Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
        xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Landscape" Orientation="Landscape"
    mc:Ignorable="d" d:DesignHeight="480" d:DesignWidth="728"
    shell:SystemTray.IsVisible="True">

   
<phoneNavigation:PhoneApplicationPage.Resources>
        <local:VideoToVideoTitleConverter x:Key="VideoToVideoTitleConverter"/>
            <DataTemplate x:Key="StringTemplate" >

            <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top">
                <toolkit:ContextMenuService.ContextMenu>
                    <toolkit:ContextMenu VerticalOffset="0.0" x:Name="contextMenu">
                        <toolkit:MenuItem Header="Remove" Click="RemoveFromPlaylist_Click"/>
                        <toolkit:MenuItem Header="Remove All" Click="RemoveAllFromPlaylist_Click"/>
                    </toolkit:ContextMenu>
                </toolkit:ContextMenuService.ContextMenu>
                <TextBlock Text="{Binding Title}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                <TextBlock Text="{Binding VideoUrl}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
            </StackPanel>
            
        </DataTemplate>
      
        <Style x:Key="PhoneProgressBarStyle" TargetType="ProgressBar">
            <Setter Property="Foreground" Value="{StaticResource PhoneAccentBrush}"/>
            <Setter Property="Background" Value="{StaticResource PhoneBackgroundBrush}"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="Height" Value="4"/>
            <Setter Property="Maximum" Value="100"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ProgressBar">
                        <Grid x:Name="Root">
                            <Grid.Resources>
                                <Style x:Key="PhoneProgressBarSliderStyle" TargetType="Slider">
                                    <Setter Property="Maximum" Value="3000"/>
                                    <Setter Property="Minimum" Value="0"/>
                                    <Setter Property="Height" Value="8"/>
                                    <Setter Property="Value" Value="0"/>
                                    <Setter Property="IsTabStop" Value="False"/>
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="Slider">
                                                <Grid x:Name="Root">
                                                    <Grid.Resources>
                                                        <ControlTemplate x:Key="SliderThumb" TargetType="Thumb">
                                                            <Ellipse Fill="{TemplateBinding Foreground}" Height="{TemplateBinding Width}" Width="{TemplateBinding Width}"/>
                                                        </ControlTemplate>
                                                    </Grid.Resources>
                                                    <Grid x:Name="HorizontalTemplate" Background="{TemplateBinding Background}">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="Auto"/>
                                                            <ColumnDefinition Width="Auto"/>
                                                            <ColumnDefinition Width="*"/>
                                                        </Grid.ColumnDefinitions>
                                                        <RepeatButton x:Name="HorizontalTrackLargeChangeDecreaseRepeatButton" Grid.Column="2" Template="{x:Null}"/>
                                                        <Thumb x:Name="HorizontalThumb" Grid.Column="1" Height="{TemplateBinding Height}" IsTabStop="False" Template="{StaticResource SliderThumb}" Width="{TemplateBinding Height}"/>
                                                        <RepeatButton x:Name="HorizontalTrackLargeChangeIncreaseRepeatButton" Grid.Column="2" Template="{x:Null}"/>
                                                    </Grid>
                                                </Grid>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </Grid.Resources>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Determinate"/>
                                    <VisualState x:Name="Indeterminate">
                                        <Storyboard RepeatBehavior="Forever">
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="IndeterminateRoot">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DeterminateRoot">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ProgressBarTrack">
                                                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="0"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.0" Duration="00:00:02.9" Storyboard.TargetProperty="value" Storyboard.TargetName="slider1">
                                                <LinearDoubleKeyFrame KeyTime="00:00:00.4" Value="1000"/>
                                                <LinearDoubleKeyFrame KeyTime="00:00:02.4" Value="2000"/>
                                                <LinearDoubleKeyFrame KeyTime="00:00:02.8" Value="3000"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.2" Duration="00:00:02.9" Storyboard.TargetProperty="value" Storyboard.TargetName="slider2">
                                                <LinearDoubleKeyFrame KeyTime="00:00:00.4" Value="1000"/>
                                                <LinearDoubleKeyFrame KeyTime="00:00:02.4" Value="2000"/>
                                                <LinearDoubleKeyFrame KeyTime="00:00:02.8" Value="3000"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4" Duration="00:00:02.9" Storyboard.TargetProperty="value" Storyboard.TargetName="slider3">
                                                <LinearDoubleKeyFrame KeyTime="00:00:00.4" Value="1000"/>
                                                <LinearDoubleKeyFrame KeyTime="00:00:02.4" Value="2000"/>
                                                <LinearDoubleKeyFrame KeyTime="00:00:02.8" Value="3000"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.6" Duration="00:00:02.9" Storyboard.TargetProperty="value" Storyboard.TargetName="slider4">
                                                <LinearDoubleKeyFrame KeyTime="00:00:00.4" Value="1000"/>
                                                <LinearDoubleKeyFrame KeyTime="00:00:02.4" Value="2000"/>
                                                <LinearDoubleKeyFrame KeyTime="00:00:02.8" Value="3000"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.8" Duration="00:00:02.9" Storyboard.TargetProperty="value" Storyboard.TargetName="slider5">
                                                <LinearDoubleKeyFrame KeyTime="00:00:00.4" Value="1000"/>
                                                <LinearDoubleKeyFrame KeyTime="00:00:02.4" Value="2000"/>
                                                <LinearDoubleKeyFrame KeyTime="00:00:02.8" Value="3000"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.0" Duration="00:00:02.9" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="slider1">
                                                <DiscreteDoubleKeyFrame KeyTime="00:00:02.8" Value="0"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.2" Duration="00:00:02.9" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="slider2">
                                                <DiscreteDoubleKeyFrame KeyTime="00:00:02.8" Value="0"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4" Duration="00:00:02.9" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="slider3">
                                                <DiscreteDoubleKeyFrame KeyTime="00:00:02.8" Value="0"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.6" Duration="00:00:02.9" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="slider4">
                                                <DiscreteDoubleKeyFrame KeyTime="00:00:02.8" Value="0"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.8" Duration="00:00:02.9" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="slider5">
                                                <DiscreteDoubleKeyFrame KeyTime="00:00:02.8" Value="0"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border x:Name="ProgressBarTrack" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Foreground}" Opacity="0.3" CornerRadius="8,0,0,0"/>
                            <Grid x:Name="ProgressBarRootGrid">
                                <Grid x:Name="IndeterminateRoot" Visibility="Collapsed">
                                    <Slider x:Name="slider1" Height="{TemplateBinding Height}" Style="{StaticResource PhoneProgressBarSliderStyle}"/>
                                    <Slider x:Name="slider2" Height="{TemplateBinding Height}" Style="{StaticResource PhoneProgressBarSliderStyle}"/>
                                    <Slider x:Name="slider3" Height="{TemplateBinding Height}" Style="{StaticResource PhoneProgressBarSliderStyle}"/>
                                    <Slider x:Name="slider4" Height="{TemplateBinding Height}" Style="{StaticResource PhoneProgressBarSliderStyle}"/>
                                    <Slider x:Name="slider5" Height="{TemplateBinding Height}" Style="{StaticResource PhoneProgressBarSliderStyle}"/>
                                </Grid>
                                <Grid x:Name="DeterminateRoot" Visibility="Visible">
                                    <Border x:Name="ProgressBarIndicator" HorizontalAlignment="Left" Background="{TemplateBinding Foreground}" CornerRadius="8,0,0,0" d:IsHidden="True"/>
                                </Grid>
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="PhoneSliderStyleVolume" TargetType="Slider">
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Maximum" Value="10"/>
            <Setter Property="Minimum" Value="0"/>
            <Setter Property="MinHeight" Value="32"/>
            <Setter Property="MinWidth" Value="32"/>
            <Setter Property="Value" Value="0"/>
            <Setter Property="Background" Value="{StaticResource PhoneBackgroundBrush}"/>
            <Setter Property="Foreground" Value="{StaticResource PhoneAccentBrush}"/>
            <Setter Property="BorderBrush" Value="{StaticResource PhoneBorderBrush}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Slider">
                        <Grid x:Name="Root">
                            <Grid.Resources>
                                <Style x:Key="PhoneExpandingThumb" TargetType="Thumb">
                                    <Setter Property="Background" Value="{StaticResource PhoneBorderBrush}"/>
                                    <Setter Property="BorderBrush" Value="{StaticResource PhoneInactiveBrush}"/>
                                    <Setter Property="Foreground" Value="{StaticResource PhoneBorderBrush}"/>
                                    <Setter Property="Padding" Value="5"/>
                                    <Setter Property="BorderThickness" Value="1"/>
                                    <Setter Property="IsTabStop" Value="False"/>
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="Thumb">
                                                <Grid x:Name="grid" RenderTransformOrigin="0.5,0.5">
                                                    <Grid.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform/>
                                                            <SkewTransform/>
                                                            <RotateTransform/>
                                                            <TranslateTransform/>
                                                        </TransformGroup>
                                                    </Grid.RenderTransform>
                                                    <VisualStateManager.VisualStateGroups>
                                                        <VisualStateGroup x:Name="CommonStates">
                                                            <VisualState x:Name="Normal"/>
                                                            <VisualState x:Name="MouseOver"/>
                                                            <VisualState x:Name="Pressed">
                                                                <Storyboard>
                                                                    <ColorAnimation BeginTime="00:00:00" Duration="00:00:00" To="{StaticResource PhoneContrastBackgroundColor}" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="ButtonBackground"/>
                                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="grid">
                                                                        <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1.5"/>
                                                                    </DoubleAnimationUsingKeyFrames>
                                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="grid">
                                                                        <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1.5"/>
                                                                    </DoubleAnimationUsingKeyFrames>
                                                                </Storyboard>
                                                            </VisualState>
                                                            <VisualState x:Name="Disabled">
                                                                <Storyboard>
                                                                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DisabledVisualElement">
                                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                                    </ObjectAnimationUsingKeyFrames>
                                                                </Storyboard>
                                                            </VisualState>
                                                        </VisualStateGroup>
                                                        <VisualStateGroup x:Name="FocusStates">
                                                            <VisualState x:Name="Focused"/>
                                                            <VisualState x:Name="Unfocused"/>
                                                        </VisualStateGroup>
                                                    </VisualStateManager.VisualStateGroups>
                                                    <Border x:Name="ButtonBackground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
                                                    <Rectangle x:Name="DisabledVisualElement" Fill="{StaticResource PhoneDisabledBrush}" IsHitTestVisible="false" Opacity="0.55" Visibility="Collapsed"/>
                                                    <Rectangle x:Name="ThumbTouchTarget" Fill="#00F4F4F5" Margin="-8,0"/>
                                                </Grid>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                                <ControlTemplate x:Key="PhoneEmptyRepeatButton" TargetType="RepeatButton">
                                    <Rectangle Fill="Transparent"/>
                                </ControlTemplate>
                            </Grid.Resources>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver"/>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="0.55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="HorizontalTrack"/>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="HorizontalThumbDisabledOverlay">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimation Duration="0" To="0.55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="VerticalTrack"/>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="VerticalThumbDisabledOverlay">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Grid x:Name="HorizontalTemplate">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="18"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <Rectangle Fill="{TemplateBinding Foreground}" Opacity="0.5"/>
                                <Path x:Name="SpeakerIcon" Stretch="Fill" Fill="{TemplateBinding Foreground}" Data="M 132.363,94.5186L 149.437,94.5186L 195.03,37.5278L 200.473,37.5278L 200.473,197.508L 196.112,197.508L 149.437,139.164L 132.363,139.164L 132.363,94.5186 Z M 266.235,117.518C 266.235,143.726 258.672,168.168 245.611,188.78L 238.593,181.116C 249.792,162.546 256.236,140.784 256.236,117.518C 256.236,94.2399 249.786,72.4683 238.576,53.8927L 245.593,46.2289C 258.666,66.8468 266.235,91.2984 266.235,117.518 Z M 246.237,117.518C 246.237,137.837 240.889,156.906 231.525,173.396L 224.39,165.604C 231.956,151.241 236.238,134.88 236.238,117.518C 236.238,100.144 231.95,83.7725 224.375,69.4027L 231.509,61.6114C 240.883,78.1078 246.237,97.1877 246.237,117.518 Z M 226.24,117.518C 226.24,131.909 222.982,145.54 217.164,157.712L 209.808,149.678C 213.952,139.783 216.241,128.918 216.241,117.518C 216.241,106.106 213.947,95.2302 209.795,85.3261L 217.15,77.2934C 222.977,89.4735 226.24,103.115 226.24,117.518 Z " UseLayoutRounding="False" Width="{TemplateBinding Value}" Height="{TemplateBinding Value}" RenderTransformOrigin="0.5,0.5">
                                    <Path.RenderTransform>
                                        <CompositeTransform ScaleX="40" ScaleY="40"/>
                                    </Path.RenderTransform>
                                </Path>
                                <Rectangle x:Name="HorizontalTrack" Grid.ColumnSpan="3" Fill="{TemplateBinding Background}" Height="8" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" Visibility="Collapsed"/>
                                <RepeatButton x:Name="HorizontalTrackLargeChangeDecreaseRepeatButton" IsTabStop="False" Template="{StaticResource PhoneEmptyRepeatButton}"/>
                                <Rectangle x:Name="HorizontalThumbDisabledOverlay" Grid.Column="1" Fill="{StaticResource PhoneDisabledBrush}" Height="32" IsHitTestVisible="False" Opacity="0.55" Visibility="Collapsed"/>
                                <RepeatButton x:Name="HorizontalTrackLargeChangeIncreaseRepeatButton" Grid.Column="2" IsTabStop="False" Template="{StaticResource PhoneEmptyRepeatButton}"/>
                                <Thumb x:Name="HorizontalThumb" BorderThickness="0" Background="{TemplateBinding Foreground}" Grid.Column="1" Foreground="{TemplateBinding Foreground}" IsTabStop="True" Style="{StaticResource PhoneExpandingThumb}"/>
                            </Grid>
                            <Grid x:Name="VerticalTemplate">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="32"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <Rectangle x:Name="VerticalTrack" Fill="{TemplateBinding Background}" Grid.RowSpan="3" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" Width="8"/>
                                <RepeatButton x:Name="VerticalTrackLargeChangeDecreaseRepeatButton" IsTabStop="False" Template="{StaticResource PhoneEmptyRepeatButton}"/>
                                <Thumb x:Name="VerticalThumb" BorderThickness="0" Background="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}" IsTabStop="True" Grid.Row="1" Style="{StaticResource PhoneExpandingThumb}" Width="32"/>
                                <Rectangle x:Name="VerticalThumbDisabledOverlay" Fill="{StaticResource PhoneDisabledBrush}" IsHitTestVisible="false" Opacity="0.55" Grid.Row="1" Visibility="Collapsed" Width="32"/>
                                <RepeatButton x:Name="VerticalTrackLargeChangeIncreaseRepeatButton" IsTabStop="False" Grid.Row="2" Template="{StaticResource PhoneEmptyRepeatButton}"/>
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="PhoneListBoxItemStyle" TargetType="ListBoxItem">
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="HorizontalAlignment" Value="Stretch"/>
            <Setter Property="VerticalAlignment" Value="Stretch"/>
            <Setter Property="Background" Value="{StaticResource PhoneBackgroundBrush}"/>
            <Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
            <Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
            <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeLarge}"/>
            <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilyNormal}"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="Padding" Value="0"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListBoxItem">
                        <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver"/>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <SolidColorBrush Color="Transparent"/>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="SelectionStates">
                                    <VisualState x:Name="Unselected"/>
                                    <VisualState x:Name="Selected">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Highlight">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="LayoutStates">
                                    <VisualState x:Name="AfterLoaded"/>
                                    <VisualState x:Name="BeforeLoaded"/>
                                    <VisualState x:Name="BeforeUnloaded"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Unfocused"/>
                                    <VisualState x:Name="Focused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Rectangle x:Name="BackgroundHint" Fill="{StaticResource PhoneAccentBrush}" IsHitTestVisible="False" Margin="0,6,0,0" Opacity="0.1"/>
                            <Rectangle x:Name="Highlight" Fill="{StaticResource PhoneAccentBrush}" IsHitTestVisible="False" Visibility="Collapsed" Margin="0,6,0,0"/>
                            <Grid Margin="{StaticResource PhoneTouchTargetOverhang}">
                                <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Storyboard x:Name="ShowPlayerControlsOnTimer">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PlayerControls">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:12" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:12.5" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="PlayerControls">
                <EasingDoubleKeyFrame KeyTime="0" Value="200"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:12" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:12.5" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:12.6" Value="200"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="HidePlayerControls">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:16.4" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:16.5" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <PointAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)" Storyboard.TargetName="HidePlayerControls">
                <EasingPointKeyFrame KeyTime="0" Value="0.5,1"/>
                <EasingPointKeyFrame KeyTime="0:0:0.1" Value="0.5,0.5"/>
                <EasingPointKeyFrame KeyTime="0:0:16.4" Value="0.5,0.5"/>
                <EasingPointKeyFrame KeyTime="0:0:16.5" Value="0.5,1"/>
            </PointAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="TextBlockShowAndHideControls">
                <EasingDoubleKeyFrame KeyTime="0:0:13" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:13.5" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:16" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:16.5" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="ShowPlayerControls">
                <EasingColorKeyFrame KeyTime="0:0:13" Value="#00000000"/>
                <EasingColorKeyFrame KeyTime="0:0:13.5" Value="#4C000000"/>
                <EasingColorKeyFrame KeyTime="0:0:16" Value="#4C000000"/>
                <EasingColorKeyFrame KeyTime="0:0:16.5" Value="#00000000"/>
            </ColorAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="HidePlayerControls1">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="HidePlayerControls">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <PointAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)" Storyboard.TargetName="HidePlayerControls">
                <EasingPointKeyFrame KeyTime="0" Value="0.5,0.5"/>
                <EasingPointKeyFrame KeyTime="0:0:0.1" Value="0.5,1"/>
            </PointAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="PlayerControls">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="PlayerControls">
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="200"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </phoneNavigation:PhoneApplicationPage.Resources>



    <Grid x:Name="LayoutRoot" Background="{StaticResource PhoneBackgroundBrush}">
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="ShowOrHidePlayList">
                <VisualStateGroup.Transitions>
                    <VisualTransition GeneratedDuration="0:0:1">
                        <VisualTransition.GeneratedEasingFunction>
                            <BackEase EasingMode="EaseInOut"/>
                        </VisualTransition.GeneratedEasingFunction>
                    </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="ShowPlayer"/>
                <VisualState x:Name="ShowPlayList">
                    <Storyboard>
                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="PlayList" d:IsOptimized="True"/>
                        <DoubleAnimation Duration="0" To="-800" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="Player" d:IsOptimized="True"/>
                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="TextBlockPlayListTitle" d:IsOptimized="True"/>
                        <DoubleAnimation Duration="0" To="-800" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="PlayerTitleAndInfo" d:IsOptimized="True"/>
                        <DoubleAnimation Duration="0" To="-800" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="ArrowIconRight" d:IsOptimized="True"/>
                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="ArrowIconLeft" d:IsOptimized="True"/>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <i:Interaction.Triggers>
            <BehaviorsLibrary:FlickGestureTrigger>
                <BehaviorsLibrary:GoToPreviousState/>
            </BehaviorsLibrary:FlickGestureTrigger>
            <BehaviorsLibrary:FlickGestureTrigger Direction="Left">
                <BehaviorsLibrary:GoToNextState/>
            </BehaviorsLibrary:FlickGestureTrigger>
        </i:Interaction.Triggers>
        <Grid.RowDefinitions>
            <RowDefinition Height="52"/>
            <RowDefinition/>
        </Grid.RowDefinitions>

        <!--TitleGrid is the name of the application and page title-->
        <Grid x:Name="TitleGrid" Background="{StaticResource PhoneBackgroundBrush}">
            <Grid x:Name="TitleGridHint" Background="{StaticResource PhoneSubtleBrush}" Opacity="0.1"/>
            <StackPanel x:Name="PlayerTitleAndInfo" Margin="20,0,60,0" Orientation="Horizontal" d:LayoutOverrides="Height" RenderTransformOrigin="0.5,0.5">
                <StackPanel.RenderTransform>
                    <CompositeTransform/>
                </StackPanel.RenderTransform>
                <TextBlock Text="video player" x:Name="TextBlockPlayerTitle" Style="{StaticResource PhoneTextPageTitle2Style}" FontSize="{StaticResource PhoneFontSizeLarge}" Margin="0" Foreground="{StaticResource PhoneForegroundBrush}" RenderTransformOrigin="0.5,0.5" d:LayoutOverrides="Width" HorizontalAlignment="Left" FontFamily="{StaticResource PhoneFontFamilyNormal}" VerticalAlignment="Top">
        			<TextBlock.RenderTransform>
        				<CompositeTransform/>
        			</TextBlock.RenderTransform>
                </TextBlock>
                <TextBlock Text=" - " x:Name="TextBlockSpacer" Style="{StaticResource PhoneTextPageTitle2Style}" FontSize="{StaticResource PhoneFontSizeLarge}" Margin="0" Foreground="{StaticResource PhoneForegroundBrush}" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" FontFamily="{StaticResource PhoneFontFamilyNormal}" VerticalAlignment="Top">
        			<TextBlock.RenderTransform>
        				<CompositeTransform/>
        			</TextBlock.RenderTransform>
                </TextBlock>
                <TextBlock x:Name="TextBlockPlayerInfo" Style="{StaticResource PhoneTextPageTitle2Style}" FontSize="{StaticResource PhoneFontSizeLarge}" Margin="0" Foreground="{StaticResource PhoneForegroundBrush}" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" FontFamily="{StaticResource PhoneFontFamilyLight}" VerticalAlignment="Top" Text="{Binding SelectedItem, Converter={StaticResource VideoToVideoTitleConverter}, ElementName=PlayList}">
        			<TextBlock.RenderTransform>
        				<CompositeTransform/>
        			</TextBlock.RenderTransform>
                </TextBlock>
            </StackPanel>
            <TextBlock Text="video playlist" x:Name="TextBlockPlayListTitle" Style="{StaticResource PhoneTextPageTitle2Style}" FontSize="{StaticResource PhoneFontSizeLarge}" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="20,0,0,0" Foreground="{StaticResource PhoneForegroundBrush}" RenderTransformOrigin="0.5,0.5">
            	<TextBlock.RenderTransform>
            		<CompositeTransform TranslateX="800"/>
            	</TextBlock.RenderTransform>
            </TextBlock>
            <Path x:Name="ArrowIconRight" Width="32" Stretch="Fill" StrokeThickness="2.66633" StrokeLineJoin="Round" Stroke="{StaticResource PhoneForegroundBrush}" Fill="Transparent" Data="M 17.3312,1.33321C 26.1666,1.33321 33.3292,8.49576 33.3292,17.3312C 33.3292,26.1667 26.1666,33.3292 17.3312,33.3292C 8.49572,33.3292 1.33317,26.1667 1.33317,17.3312C 1.33317,8.49576 8.49573,1.33321 17.3312,1.33321 Z M 18.026,8.91557L 26.5936,17.3312L 18.026,25.7468M 7.06872,17.3312L 26.5936,17.3312" HorizontalAlignment="Right" UseLayoutRounding="False" Height="32" Margin="0,0,10,0" RenderTransformOrigin="0.5,0.5">
                <Path.RenderTransform>
                    <CompositeTransform/>
                </Path.RenderTransform>
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="MouseLeftButtonDown">
                        <ic:GoToStateAction StateName="ShowPlayList"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </Path>
            <Path x:Name="ArrowIconLeft" Width="32" Stretch="Fill" StrokeThickness="2.66633" StrokeLineJoin="Round" Stroke="{StaticResource PhoneForegroundBrush}" Fill="Transparent" Data="M 17.3312,1.33321C 26.1666,1.33321 33.3292,8.49576 33.3292,17.3312C 33.3292,26.1667 26.1666,33.3292 17.3312,33.3292C 8.49572,33.3292 1.33317,26.1667 1.33317,17.3312C 1.33317,8.49576 8.49573,1.33321 17.3312,1.33321 Z M 18.026,8.91557L 26.5936,17.3312L 18.026,25.7468M 7.06872,17.3312L 26.5936,17.3312" HorizontalAlignment="Right" UseLayoutRounding="False" Height="32" Margin="0,10,10,10" RenderTransformOrigin="0.5,0.5">
                <Path.RenderTransform>
                    <CompositeTransform ScaleX="-1" TranslateX="800"/>
                </Path.RenderTransform>
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="MouseLeftButtonDown">
                        <ic:GoToStateAction StateName="ShowPlayer"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </Path>
        </Grid>

        <!--ContentGrid is empty. Place new content here-->
        <Grid x:Name="Player" Grid.Row="1" RenderTransformOrigin="0.5,0.5">
            <Grid.RenderTransform>
                <CompositeTransform/>
            </Grid.RenderTransform>
            <MediaElement x:Name="mediaElement" Source="{Binding SelectedVideoProperty}" AutoPlay="True" d:LayoutOverrides="Width" Cursor="Arrow" Volume="0.8">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="MediaOpened">
                        <GalaSoft_MvvmLight_Command:EventToCommand x:Name="SetMediaOpened" Command="{Binding MediaOpenedCommand}" CommandParameter="{Binding ElementName=mediaElement, Mode=OneWay}"/>
                        <im:ControlStoryboardAction Storyboard="{StaticResource ShowPlayerControlsOnTimer}"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </MediaElement>
            <Rectangle x:Name="ShowPlayerControls" Fill="#00000000" Height="180" VerticalAlignment="Bottom">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="MouseLeftButtonDown">
                        <im:ControlStoryboardAction Storyboard="{StaticResource ShowPlayerControlsOnTimer}"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </Rectangle>
            <TextBlock x:Name="TextBlockShowAndHideControls" TextWrapping="Wrap" Text="Click in shaded area to show/hide player controls" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="50,0,50,100" TextAlignment="Center" Foreground="{StaticResource PhoneForegroundBrush}" FontSize="{StaticResource PhoneFontSizeLarge}" Opacity="0" IsHitTestVisible="False"/>
            <Rectangle x:Name="HidePlayerControls" Fill="#00000000" Height="180" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="MouseLeftButtonDown">
                        <im:ControlStoryboardAction Storyboard="{StaticResource HidePlayerControls1}"/>
                        <im:ControlStoryboardAction ControlStoryboardOption="Stop" Storyboard="{StaticResource ShowPlayerControlsOnTimer}"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
                <Rectangle.RenderTransform>
                    <CompositeTransform/>
                </Rectangle.RenderTransform>
            </Rectangle>
            <Grid x:Name="PlayerControls" d:LayoutOverrides="GridBox" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,32" RenderTransformOrigin="0.5,0.5" >
                <Grid.RenderTransform>
                    <CompositeTransform/>
                </Grid.RenderTransform>
                <Grid.RowDefinitions>
                    <RowDefinition Height="0.227*"/>
                    <RowDefinition Height="0.773*"/>
                </Grid.RowDefinitions>
                <Border x:Name="ProgressInfo" BorderThickness="3" BorderBrush="{StaticResource PhoneAccentBrush}" CornerRadius="20,20,0,0" IsHitTestVisible="False">
                    <Border.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#4C000000" Offset="0"/>
                            <GradientStop Color="#B2000000" Offset="1"/>
                        </LinearGradientBrush>
                    </Border.Background>
                    <Grid Margin="{StaticResource PhoneTouchTargetOverhang}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock x:Name="ProgressDisplay" Text="{Binding CurrentProgressProperty}" TextAlignment="Center" RenderTransformOrigin="0.5,0.5" Grid.Column="1" FontSize="{StaticResource PhoneFontSizeNormal}" FontFamily="{StaticResource PhoneFontFamilySemiBold}" Foreground="{StaticResource PhoneAccentBrush}">
							<TextBlock.RenderTransform>
								<CompositeTransform/>
							</TextBlock.RenderTransform>
                        </TextBlock>
                        <ProgressBar x:Name="progressBar" Maximum="{Binding TotalDurationProperty}" Value="{Binding CurrentPositionProperty}" Margin="0,0,10,0" Height="18" Style="{StaticResource PhoneProgressBarStyle}" Foreground="{StaticResource PhoneAccentBrush}"/>
                    </Grid>
                </Border>
                <Border x:Name="NavigationAndVolume" Grid.Row="1" BorderThickness="3,0,3,3" BorderBrush="{StaticResource PhoneAccentBrush}" CornerRadius="0,0,20,20" >
                    <Border.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#4C000000" Offset="1"/>
                            <GradientStop Color="#B2000000"/>
                        </LinearGradientBrush>
                    </Border.Background>
                    <StackPanel Orientation="Horizontal" >
                        <Button x:Name="StopButton" Content="Stop" Width="120" Style="{StaticResource PhoneButtonStyleStop}" Height="80">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Click">
                                    <GalaSoft_MvvmLight_Command:EventToCommand Command="{Binding StopVideoCommand}"/>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </Button>
                        <Button x:Name="PlayButton" Content="Play" Width="120" Height="80" Style="{StaticResource PhoneButtonStylePlay}">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Click">
                                    <GalaSoft_MvvmLight_Command:EventToCommand Command="{Binding PlayVideoCommand}"/>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </Button>
                        <Button x:Name="PauseButton" Content="Pause" Width="120" Height="80" Style="{StaticResource PhoneButtonStylePause}">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Click">
                                    <GalaSoft_MvvmLight_Command:EventToCommand Command="{Binding PauseVideoCommand}"/>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </Button>
                        <Border x:Name="VolumeSlider" Width="160"  CornerRadius="0,0,8,0" BorderBrush="{StaticResource PhoneAccentBrush}" Margin="{StaticResource PhoneTouchTargetOverhang}" >
                            <Slider Maximum="1" LargeChange="0.5" Value="{Binding Volume, ElementName=mediaElement, Mode=TwoWay}" Style="{StaticResource PhoneSliderStyleVolume}">
                                <i:Interaction.Triggers>
                                    <i:EventTrigger EventName="ValueChanged">
                                        <GalaSoft_MvvmLight_Command:EventToCommand/>
                                    </i:EventTrigger>
                                </i:Interaction.Triggers>
                            </Slider>
                        </Border>
                    </StackPanel>
                </Border>
            </Grid>
        </Grid>
        <ListBox x:Name="PlayList" ItemTemplate="{StaticResource StringTemplate}" ItemsSource="{Binding SilverlightVideoList}" ScrollViewer.VerticalScrollBarVisibility="Auto" Padding="0" SelectedIndex="{Binding SelectedVideoInListProperty}" IsSynchronizedWithCurrentItem="False" Grid.Row="1" ItemContainerStyle="{StaticResource PhoneListBoxItemStyle}" RenderTransformOrigin="0.5,0.5">
            <toolkit:ContextMenuService.ContextMenu>
                <toolkit:ContextMenu VerticalOffset="0.0" x:Name="contextMenu">
                    <toolkit:MenuItem Header="Remove" Click="RemoveFromPlaylist_Click"/>
                </toolkit:ContextMenu>
            </toolkit:ContextMenuService.ContextMenu>
            <ListBox.RenderTransform>
                <CompositeTransform TranslateX="800"/>
            </ListBox.RenderTransform>
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="SelectionChanged">
                    <GalaSoft_MvvmLight_Command:EventToCommand Command="{Binding SetVideoCommand}" CommandParameter="{Binding SelectedItem, ElementName=PlayList}"/>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </ListBox>
    </Grid>

</phoneNavigation:PhoneApplicationPage>
    
    <!--
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <smf:SMFPlayer Playlist="{Binding Movies}" CurrentPlaylistItem="{Binding Movie}" VolumeLevel="1"/>
  
        <smf:SMFPlayer x:Name="Player">
            <smf:SMFPlayer.Playlist>
                <media:PlaylistItem Description="Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music: Steve Ball" Title="Wildlife in HD" DeliveryMethod="ProgressiveDownload" MediaSource="http://download157.mediafire.com/67bucd8mexsg/zmkyzxnkiyo/Wildlife.wmv" ThumbSource="Wildlife_4.000.jpg"/>
            </smf:SMFPlayer.Playlist>
        </smf:SMFPlayer>
    </Grid>
</phone:PhoneApplicationPage>

LayoutRoot is the root grid where all page content is placed

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        ContentPanel - place additional content here
        <Grid x:Name="ContentPanel" Grid.Row="0" Margin="12,0,12,0">
            <StackPanel>
                <Core:SMFPlayer>
                    <Core:SMFPlayer.Playlist>
                        <Media:PlaylistItem DeliveryMethod="AdaptiveStreaming" MediaSource="http://ecn.channel9.msdn.com/o9/content/smf/smoothcontent/bbbwp7/big%20buck%20bunny.ism/Manifest"/>
                    </Core:SMFPlayer.Playlist>
                </Core:SMFPlayer>
            </StackPanel>
        </Grid>
        
    </Grid>
 
   Sample code showing usage of ApplicationBar
    
        <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.transport.play.rest.png" Click="Play_Click" Text="Favorite"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.transport.pause.rest.png" Click="Pause_Click" Text="Playlist"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.favs.addto.rest.png" Click="AddFavorite_Click" Text="Next"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="Download"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>



    </phone:PhoneApplicationPage.ApplicationBar>
    
    <MediaElement AutoPlay="True" 
                          Stretch="Fill"
                          Name="TEDVideoElement"
                          Height="400"/>
                <ProgressBar Name="pbVideo"/>
                <TextBlock Text="{Binding url}"></TextBlock>
    
    -->


